package DB.dto;

import java.io.Serializable;

public class DrugDoseDto implements Serializable
{
	/** 
	 * This attribute maps to the column ID_DRUGDOSE in the DRUG_DOSE table.
	 */
	protected int idDrugdose;

	/** 
	 * This attribute maps to the column ID_DRUG in the DRUG_DOSE table.
	 */
	protected int idDrug;

	/** 
	 * This attribute maps to the column ID_PRESCRIPTION in the DRUG_DOSE table.
	 */
	protected int idPrescription;

	/** 
	 * This attribute maps to the column WEIGTH in the DRUG_DOSE table.
	 */
	protected double weigth;

	/** 
	 * This attribute represents whether the primitive attribute weigth is null.
	 */
	protected boolean weigthNull = true;

	/** 
	 * This attribute maps to the column PERIOD in the DRUG_DOSE table.
	 */
	protected long period;

	/** 
	 * This attribute represents whether the primitive attribute period is null.
	 */
	protected boolean periodNull = true;

	/** 
	 * This attribute maps to the column TERM in the DRUG_DOSE table.
	 */
	protected long term;

	/** 
	 * This attribute represents whether the primitive attribute term is null.
	 */
	protected boolean termNull = true;

	/** 
	 * This attribute maps to the column COMMENT in the DRUG_DOSE table.
	 */
	protected String comment;

	/**
	 * Method 'DrugDoseDto'
	 * 
	 */
	public DrugDoseDto()
	{
	}

	/**
	 * Method 'getIdDrugdose'
	 * 
	 * @return int
	 */
	public int getIdDrugdose()
	{
		return idDrugdose;
	}

	/**
	 * Method 'setIdDrugdose'
	 * 
	 * @param idDrugdose
	 */
	public void setIdDrugdose(int idDrugdose)
	{
		this.idDrugdose = idDrugdose;
	}

	/**
	 * Method 'getIdDrug'
	 * 
	 * @return int
	 */
	public int getIdDrug()
	{
		return idDrug;
	}

	/**
	 * Method 'setIdDrug'
	 * 
	 * @param idDrug
	 */
	public void setIdDrug(int idDrug)
	{
		this.idDrug = idDrug;
	}

	/**
	 * Method 'getIdPrescription'
	 * 
	 * @return int
	 */
	public int getIdPrescription()
	{
		return idPrescription;
	}

	/**
	 * Method 'setIdPrescription'
	 * 
	 * @param idPrescription
	 */
	public void setIdPrescription(int idPrescription)
	{
		this.idPrescription = idPrescription;
	}

	/**
	 * Method 'getWeigth'
	 * 
	 * @return double
	 */
	public double getWeigth()
	{
		return weigth;
	}

	/**
	 * Method 'setWeigth'
	 * 
	 * @param weigth
	 */
	public void setWeigth(double weigth)
	{
		this.weigth = weigth;
		this.weigthNull = false;
	}

	/**
	 * Method 'setWeigthNull'
	 * 
	 * @param value
	 */
	public void setWeigthNull(boolean value)
	{
		this.weigthNull = value;
	}

	/**
	 * Method 'isWeigthNull'
	 * 
	 * @return boolean
	 */
	public boolean isWeigthNull()
	{
		return weigthNull;
	}

	/**
	 * Method 'getPeriod'
	 * 
	 * @return long
	 */
	public long getPeriod()
	{
		return period;
	}

	/**
	 * Method 'setPeriod'
	 * 
	 * @param period
	 */
	public void setPeriod(long period)
	{
		this.period = period;
		this.periodNull = false;
	}

	/**
	 * Method 'setPeriodNull'
	 * 
	 * @param value
	 */
	public void setPeriodNull(boolean value)
	{
		this.periodNull = value;
	}

	/**
	 * Method 'isPeriodNull'
	 * 
	 * @return boolean
	 */
	public boolean isPeriodNull()
	{
		return periodNull;
	}

	/**
	 * Method 'getTerm'
	 * 
	 * @return long
	 */
	public long getTerm()
	{
		return term;
	}

	/**
	 * Method 'setTerm'
	 * 
	 * @param term
	 */
	public void setTerm(long term)
	{
		this.term = term;
		this.termNull = false;
	}

	/**
	 * Method 'setTermNull'
	 * 
	 * @param value
	 */
	public void setTermNull(boolean value)
	{
		this.termNull = value;
	}

	/**
	 * Method 'isTermNull'
	 * 
	 * @return boolean
	 */
	public boolean isTermNull()
	{
		return termNull;
	}

	/**
	 * Method 'getComment'
	 * 
	 * @return String
	 */
	public String getComment()
	{
		return comment;
	}

	/**
	 * Method 'setComment'
	 * 
	 * @param comment
	 */
	public void setComment(String comment)
	{
		this.comment = comment;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof DrugDoseDto)) {
			return false;
		}
		
		final DrugDoseDto _cast = (DrugDoseDto) _other;
		if (idDrugdose != _cast.idDrugdose) {
			return false;
		}
		
		if (idDrug != _cast.idDrug) {
			return false;
		}
		
		if (idPrescription != _cast.idPrescription) {
			return false;
		}
		
		if (weigth != _cast.weigth) {
			return false;
		}
		
		if (weigthNull != _cast.weigthNull) {
			return false;
		}
		
		if (period != _cast.period) {
			return false;
		}
		
		if (periodNull != _cast.periodNull) {
			return false;
		}
		
		if (term != _cast.term) {
			return false;
		}
		
		if (termNull != _cast.termNull) {
			return false;
		}
		
		if (comment == null ? _cast.comment != comment : !comment.equals( _cast.comment )) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idDrugdose;
		_hashCode = 29 * _hashCode + idDrug;
		_hashCode = 29 * _hashCode + idPrescription;
		long temp_weigth = Double.doubleToLongBits(weigth);
		_hashCode = 29 * _hashCode + (int) (temp_weigth ^ (temp_weigth >>> 32));
		_hashCode = 29 * _hashCode + (weigthNull ? 1 : 0);
		_hashCode = 29 * _hashCode + (int) (period ^ (period >>> 32));
		_hashCode = 29 * _hashCode + (periodNull ? 1 : 0);
		_hashCode = 29 * _hashCode + (int) (term ^ (term >>> 32));
		_hashCode = 29 * _hashCode + (termNull ? 1 : 0);
		if (comment != null) {
			_hashCode = 29 * _hashCode + comment.hashCode();
		}
		
		return _hashCode;
	}

    /**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "DB.dto.DrugDoseDto: " );
		ret.append( "idDrugdose=" + idDrugdose );
		ret.append( ", idDrug=" + idDrug );
		ret.append( ", idPrescription=" + idPrescription );
		ret.append( ", weigth=" + weigth );
		ret.append( ", period=" + period );
		ret.append( ", term=" + term );
		ret.append( ", comment=" + comment );
		return ret.toString();
	}

}
